package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class OnlySpecTablePrimary implements TablePrimary {

    private int beginIndex;
    private int endIndex;
    private TableOrQueryName tableOrQueryName;
    private Identifier correlationName;
    private IdentifierChain derivedColumnList;


    public OnlySpecTablePrimary(int beginIndex,
                                int endIndex,
                                TableOrQueryName tableOrQueryName,
                                Identifier correlationName,
                                IdentifierChain derivedColumnList) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.tableOrQueryName = tableOrQueryName;
        this.correlationName = correlationName;
        this.derivedColumnList = derivedColumnList;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public TableOrQueryName getTableOrQueryName() {
        return tableOrQueryName;
    }

    public Identifier getCorrelationName() {
        return correlationName;
    }

    public IdentifierChain getDerivedColumnList() {
        return derivedColumnList;
    }

}
